﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
using Public;
namespace SalomonWebsite
{
    public partial class NewsDetail : System.Web.UI.Page
    {
        public string newsTitle = "";
        public string newsContent = "";
        public string keywords = "";
        public string description = "";
        public int pkid;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request["pkid"] != null && Request["pkid"].ToString() != "")
                {
                    pkid = Convert.ToInt32(Request["pkid"]);
                    DataTable dtNews = Bll.News.Single(Global.Connection,pkid);
                    if (dtNews.Rows.Count == 1)
                    {
                        newsTitle = dtNews.Rows[0]["NewsTitle"].ToString();
                        newsContent = dtNews.Rows[0]["NewsContent"].ToString();
                        keywords = dtNews.Rows[0]["Keywords"].ToString();
                        description  = dtNews.Rows[0]["Description"].ToString();

                    }
                    dtNews.Dispose();
                }
                else
                {

                }
            }
        }
    }
}
